﻿"use strict";
define(["service/service", "service/httpService"], function (service) {
    service.factory("courseService", function ($location, httpService) {
        var methods = {
            gets: function (params) {
                return httpService.get("/admin/course/gets", params);
            },
            get: function (params) {
                return httpService.get("/admin/course/get", params);
            },
            'delete': function (id) {
                return httpService.delete("/admin/course/delete/" + id);
            },
            enable: function (id, isEnable) {
                return httpService.post("/admin/course/enable", { id: id, isEnable: isEnable });
            },
            save: function (params) {
                return httpService.post("/admin/course/save", params);
            }
        }
        return methods;
    });
});